package com.zkjl.protect_business.entity;

import com.zkjl.protect_business.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * 日志实体
 **/
@Data
@ApiModel(value = "Log对象", description = "日志对象")
@Document(indexName = "pb_log", shards = 1, replicas = 0)
public class Log extends BaseEntity {

    @Id
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "操作名称")
    private String name;

    @ApiModelProperty(value = "日志类型 登录  操作 业务操作")
    @Field(name = "log_type")
    private String logType;

    @ApiModelProperty(value = "操作类型  新增 修改 删除 上传 导出 下载 确认接收 修改密码")
    @Field(name = "operation_type")
    private String operationType;

    @ApiModelProperty(value = "请求路径")
    @Field(name = "request_url")
    private String requestUrl;

    @ApiModelProperty(value = "请求类型")
    @Field(name = "request_type")
    private String requestType;

    @ApiModelProperty(value = "请求参数")
    @Field(name = "request_param")
    private String requestParam;

    @ApiModelProperty(value = "具体内容")
    private String content;

    @ApiModelProperty(value = "请求耗时")
    private Integer costTime;



}
